/*! \file StreamUtils.cpp
 *	\brief 
 *
 *	created:	2010/08/10
 *	created:	10:8:2010   13:04
 *	filename: 	C:\Users\venn\Documents\projects\tactics-engine\libs\io\StreamUtils.cpp
 *	file path:	C:\Users\venn\Documents\projects\tactics-engine\libs\io
 *	file base:	StreamUtils
 *	file ext:	cpp
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */
#include "io/stdafx.h"
#include "StreamUtils.h"

namespace tt{
namespace io{

Size streamSize( BaseIStream& is )
{
	BaseIStream::streamoff currentPos = is.tellg();
	is.seekg(0, BaseIStream::end);
	BaseIStream::streamoff size = is.tellg();
	is.seekg(currentPos, BaseIStream::beg);
	return static_cast<Size>(size);
}

} //namespace io
} //namespace tt